﻿<UserControl x:Class="SomethingSpacial.Views.MixItUp.MapControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
    xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"  
    
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <esri:Map x:Name="MyMap" Loaded="MyMap_Loaded" >
            <esri:Map.Resources>
                <!--Strobe symbol template-->
                <esriSymbols:MarkerSymbol x:Name="strobeSymbol">
                    <esriSymbols:MarkerSymbol.ControlTemplate>
                        <ControlTemplate>
                            <Canvas>
                                <vsm:VisualStateManager.VisualStateGroups>
                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                        <vsm:VisualState x:Name="Normal">
                                            <Storyboard RepeatBehavior="ForEver">

                                                <DoubleAnimation BeginTime="0"
																 Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
																 From="1" To="10" Duration="00:00:01" />

                                                <DoubleAnimation BeginTime="0"
																 Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
																 From="1" To="10" Duration="00:00:01" />

                                                <DoubleAnimation BeginTime="0"
																 Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.Opacity)"
																 From="1" To="0" Duration="00:00:01" />
                                            </Storyboard>
                                        </vsm:VisualState>
                                        <!--If we don't speficy a normal state, the animation will 
										    keep going when we mouse out. In this case we don't need
											a transition back to normal, so we will just keep it empty -->
                                        <vsm:VisualState x:Name="MouseOver" />
                                    </vsm:VisualStateGroup>
                                </vsm:VisualStateManager.VisualStateGroups>


                                <!--Strobe ellipse-->

                                <!--Note that we set IsHitTestVisible="False" on the strobe symbol,
								so only the static ellipse will trigger mouse over/mouse out-->
                                <Ellipse Height="10" Width="10" Canvas.Left="-5" Canvas.Top="-5" 
										 RenderTransformOrigin="0.5,0.5" x:Name="ellipse"
										 IsHitTestVisible="False"
										 >
                                    <Ellipse.RenderTransform>
                                        <ScaleTransform />
                                    </Ellipse.RenderTransform>
                                    <Ellipse.Fill>
                                        <RadialGradientBrush>
                                            <GradientStop Color="#00FF0000" />
                                            <GradientStop Color="#FFFF0000" Offset="0.25"/>
                                            <GradientStop Color="#00FF0000" Offset="0.5"/>
                                            <GradientStop Color="#FFFF0000" Offset="0.75"/>
                                            <GradientStop Color="#00FF0000" Offset="1"/>
                                        </RadialGradientBrush>
                                    </Ellipse.Fill>
                                </Ellipse>
                                <!--Static symbol on top-->
                                <Ellipse Height="10" Width="10" Canvas.Left="-5" Canvas.Top="-5" 
										 Fill="#FFFF0000" x:Name="ellipse1"/>

                            </Canvas>
                        </ControlTemplate>

                    </esriSymbols:MarkerSymbol.ControlTemplate>


                </esriSymbols:MarkerSymbol>
            </esri:Map.Resources>
            <esri:ArcGISTiledMapServiceLayer ID="StreetMap" Url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />
            <esri:GraphicsLayer ID="MyGraphicsLayer" />
        </esri:Map>
    </Grid>
</UserControl>
